<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // map其结果是该数组中的每个元素是调用一次提供的函数后的返回值。
      (function () {
        const array1 = [1, 4, 9, 16];
        const map1 = array1.map((x) => x * 2);
        console.log(map1); //2, 8, 18, 32]
      })();
    </script>
  </body>
</html>
